﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CategoriesMgmView.aspx.cs" Inherits="Skynet.WebSite.Administracion.CategoriesMgmView" %>

<%@ Register Assembly="Skynet.WebFoundation" Namespace="Skynet.WebFoundation.Controls.Runtime"    TagPrefix="cc1" %>
<%@ Register Assembly="Infrastructure.Web" Namespace="Infrastructure.Web.Controls" TagPrefix="cc2"   %>


<asp:Content ID="Content1" runat="server" contentplaceholderid="MainContent">
    <asp:DynamicDataManager ID="DynamicDataManager1" runat="server"  >
    <DataControls>
        <asp:DataControlReference ControlID="gvCategories" />
    </DataControls>
    </asp:DynamicDataManager>
    <table  style="width:100%">
        <tr>
            <td>
                <asp:GridView ID="gvCategories" runat="server" AllowPaging="True" 
                    AutoGenerateColumns="False" DataKeyNames="Id" DataSourceID="ocdsCategories" 
                    onselectedindexchanged="gvCategories_SelectedIndexChanged" 
                    ViewStateMode="Disabled" BackColor="White" BorderColor="#DEDFDE" 
                    BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" 
                    GridLines="Vertical" Width="100%">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:CommandField ShowDeleteButton="True" ShowSelectButton="True" />                                                                        
                       <%-- <asp:BoundField DataField="Title"  HeaderText="Title" />--%>
                        
                       <cc2:DynamicBoundField DataField="Title" HeaderText="Title"></cc2:DynamicBoundField>
                       <cc2:DynamicBoundField DataField="Description" HeaderText="Description"></cc2:DynamicBoundField>
                       <cc2:DynamicBoundField DataField="NumberExams" HeaderText="Exams"></cc2:DynamicBoundField>
                       
                       
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                    <RowStyle BackColor="#F7F7DE" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#FBFBF2" />
                    <SortedAscendingHeaderStyle BackColor="#848384" />
                    <SortedDescendingCellStyle BackColor="#EAEAD3" />
                    <SortedDescendingHeaderStyle BackColor="#575357" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td>
                <asp:DetailsView ID="dvCategory" runat="server" DataSourceID="ocdsWorkCategory" 
                    DefaultMode="Insert" Height="50px" Width="125px" DataKeyNames="Id,CreatedBy">
                    <Fields>
                        <asp:CommandField ShowEditButton="True" ShowInsertButton="True" />
                    </Fields>
                </asp:DetailsView>                
               
                
            </td>
        </tr>
        <tr>
            <td>
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
            </td>
        </tr>
        <tr>
            <td>
                <asp:ObjectDataSource ID="ocdsCategories" runat="server" 
                    DataObjectTypeName="Skynet.BusinessEntities.ExamCategory" DeleteMethod="Delete" 
                    InsertMethod="Add" OldValuesParameterFormatString="original_{0}" 
                    SelectMethod="GetCategorias" 
                    TypeName="Skynet.WebAdministracion.Views.CategoriesMgm.CategoriesMgmPresenter" 
                    UpdateMethod="Update"></asp:ObjectDataSource>
                <asp:ObjectDataSource ID="ocdsWorkCategory" runat="server" 
                    DataObjectTypeName="Skynet.BusinessEntities.ExamCategory" InsertMethod="Add" 
                    OldValuesParameterFormatString="original_{0}" SelectMethod="GetOne" 
                    TypeName="Skynet.WebAdministracion.Views.CategoriesMgm.CategoriesMgmPresenter" 
                    UpdateMethod="Update">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="gvCategories" DbType="Guid" Name="Id" 
                            PropertyName="SelectedValue" />
                    </SelectParameters>
                </asp:ObjectDataSource>
            </td>
        </tr>
    </table>
</asp:Content>



